Skip to content

feat(bugfix): add /speedrun command for running remaining phases without stopping#71

Merged
jwm4 merged 3 commits intoambient-code:mainfrom
jwm4:feature/bugfix-speedrun-command
Mar 16, 2026
Merged

feat(bugfix): add /speedrun command for running remaining phases without stopping#71
jwm4 merged 3 commits intoambient-code:mainfrom
jwm4:feature/bugfix-speedrun-command

Conversation

@jwm4
Copy link
Copy Markdown
Contributor

@jwm4 jwm4 commented Mar 12, 2026

Summary

  • Adds a /speedrun command to the bugfix workflow that auto-advances through remaining phases without stopping between them, using artifact detection to determine where to pick up
  • Updates all 8 phase skill endings to use generic "return to dispatcher" instead of hardcoding the controller path, enabling skills to return to either the controller or speedrun depending on what dispatched them
  • Updates the controller and speedrun to announce themselves as the dispatcher when starting each phase, creating breadcrumbs in conversation context that skills use to find their way back

Closes #53

Design

The speedrun command works as a re-readable loop: each time it's read, it checks artifacts to find the next incomplete phase, dispatches it, and the skill returns here when done. Three mechanisms prevent context drift:

  1. Generic skill endings — skills say "return to the file that dispatched you" instead of hardcoding the controller
  2. Dispatcher breadcrumbs — both controller and speedrun include their path in the phase announcement, putting the return path in recent conversation context
  3. Return announcements — skills announce which file they're returning to before re-reading it, giving visibility into whether the right file was selected

Normal stop-and-wait behavior is fully preserved when using individual phase commands.

Test plan

  • Run the bugfix workflow normally (e.g. /assess then /reproduce) — verify stop-and-wait behavior still works and skills return to the controller
  • Run /speedrun from scratch with a bug report — verify it runs all phases sequentially
  • Run a few phases manually, then invoke /speedrun — verify it detects completed phases via artifacts and picks up from the next one
  • Verify dispatcher breadcrumbs appear in conversation (e.g. "Starting /fix phase (dispatched by ...)")
  • Verify return announcements appear (e.g. "Returning to ... for next phase.")

Made with Cursor

…out stopping

Add a speedrun command that auto-advances through the bugfix workflow
from the current phase to the end, using artifact detection to determine
where to pick up. The command replaces the controller for the duration
of the run, dispatching one phase at a time and looping via re-reads.

To support this without breaking the existing stop-and-wait behavior:

- Update all 8 phase skills to use generic "return to dispatcher"
  endings instead of hardcoding the controller path, with both
  controller and speedrun shown as examples
- Update the controller announce step to include its path as the
  dispatcher so skills can find their way back
- Speedrun announces itself as dispatcher on each phase entry,
  creating breadcrumbs in conversation context that skills use
  to return to the right file

Made-with: Cursor
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 12, 2026

Walkthrough

This PR introduces a new speedrun workflow dispatcher and updates skill files to support dynamic file-based control flow routing. The speedrun dispatcher coordinates sequential phase execution without pauses, while skills now announce their return destination before re-reading for next steps. Two skills gain artifact persistence functionality.

Changes

Cohort / File(s) Summary
New Speedrun Dispatcher
workflows/bugfix/.claude/commands/speedrun.md
Introduces a self-contained workflow dispatcher that loops through bugfix phases (assess, reproduce, diagnose, fix, test, review, document, pr) based on artifact signals, determines completion, executes phases via skills, and returns to itself for continuation.
Artifact-Saving Skills
workflows/bugfix/.claude/skills/assess/SKILL.md, workflows/bugfix/.claude/skills/review/SKILL.md
Both skills now include new steps to write and persist their outputs: assessment.md and verdict.md to respective artifact directories, with corresponding Output section updates.
Control Flow Updates
workflows/bugfix/.claude/skills/controller/SKILL.md, workflows/bugfix/.claude/skills/diagnose/SKILL.md, workflows/bugfix/.claude/skills/document/SKILL.md, workflows/bugfix/.claude/skills/fix/SKILL.md, workflows/bugfix/.claude/skills/pr/SKILL.md, workflows/bugfix/.claude/skills/reproduce/SKILL.md, workflows/bugfix/.claude/skills/test/SKILL.md
All skills updated to announce their return file destination and re-read that target file instead of defaulting to the controller, enabling dynamic routing and speedrun dispatcher coordination.

Sequence Diagram

sequenceDiagram
    actor User
    participant Speedrun as Speedrun Dispatcher
    participant Skill as Current Skill
    participant Artifacts as Artifact Storage
    
    User->>Speedrun: Start speedrun workflow
    
    loop Each Phase
        Speedrun->>Speedrun: Check artifact signals
        Speedrun->>Speedrun: Determine next phase
        alt All phases complete
            Speedrun->>User: Return completion report
        else Phase remaining
            Speedrun->>Skill: Execute phase
            Skill->>Skill: Perform phase logic
            Skill->>Artifacts: Save results (if applicable)
            Skill->>Skill: Announce return file
            Skill->>Speedrun: Re-read for next steps
        end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main addition: a /speedrun command for the bugfix workflow that enables running remaining phases sequentially without stopping.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly relates to the changeset, detailing the addition of a /speedrun command, updates to phase skill endings for dispatcher flexibility, and controller/speedrun breadcrumb announcements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jwm4 jwm4 marked this pull request as ready for review March 12, 2026 20:57
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@workflows/bugfix/.claude/commands/speedrun.md`:
- Around line 55-58: Summary: Tighten repetitive "If ..." bullet phrasing for
readability by rewording one bullet. Change the bullet that currently reads "If
conversation context clearly establishes a phase was completed (even without an
artifact), skip it." to a non-repetitive opener such as "When conversation
context clearly establishes a phase was completed (even without an artifact),
skip it." Update the line in workflows/bugfix/.claude/commands/speedrun.md where
that exact bullet text appears so the three bullets no longer all begin with
"If".
- Around line 48-58: Update the speedrun phase gating to use a concrete, durable
review artifact so the review phase runs exactly once per cycle: modify
workflows/bugfix/.claude/commands/speedrun.md to require and check for a
persistent review artifact (e.g., an artifacts/bugfix/review-complete file)
instead of relying solely on context; update the table entry for the "review"
phase that currently references `.claude/skills/review/SKILL.md` to point to the
new artifact, and ensure any code that creates the artifact (the review workflow
or `.claude/skills/review` runner) writes that artifact when review completes so
`speedrun` can deterministically detect completion.
- Line 43: Replace the non-durable conversation-state-based phase selection for
the /assess command with a durable completion artifact: update the /assess
command handler so it writes and reads a named durable artifact (e.g.,
"assess_phase" or "assess_completion") instead of relying on ephemeral
conversation state, and change the SKILL.md references that determine phase
routing to consult that artifact on resume; ensure creation, update, and lookup
of the artifact are performed at the same points where phase transitions happen
so resumability across restarts uses the durable artifact.

In `@workflows/bugfix/.claude/skills/controller/SKILL.md`:
- Around line 41-49: The controller SKILL.md dispatcher needs the same explicit
escalation guardrails as the speedrun command; update
workflows/bugfix/.claude/skills/controller/SKILL.md to include the escalation
checks and prompts copied/adapted from
workflows/bugfix/.claude/commands/speedrun.md (the guardrail block around Line
76-80) so controller-driven execution enforces the same escalation parity;
ensure the dispatcher announcement still appears (the "Starting the /fix
phase..." message) and then run the escalation-check sequence before proceeding
to step 2 (Read the skill file) so the controller and speedrun entrypoints
behave identically.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7ecfcb7d-778b-4582-b059-118a56fc80d8

📥 Commits

Reviewing files that changed from the base of the PR and between 7d4b7e8 and db04465.

📒 Files selected for processing (10)
  • workflows/bugfix/.claude/commands/speedrun.md
  • workflows/bugfix/.claude/skills/assess/SKILL.md
  • workflows/bugfix/.claude/skills/controller/SKILL.md
  • workflows/bugfix/.claude/skills/diagnose/SKILL.md
  • workflows/bugfix/.claude/skills/document/SKILL.md
  • workflows/bugfix/.claude/skills/fix/SKILL.md
  • workflows/bugfix/.claude/skills/pr/SKILL.md
  • workflows/bugfix/.claude/skills/reproduce/SKILL.md
  • workflows/bugfix/.claude/skills/review/SKILL.md
  • workflows/bugfix/.claude/skills/test/SKILL.md

Comment on lines +48 to +58
| review | `.claude/skills/review/SKILL.md` | Always run once between test and document |
| document | `.claude/skills/document/SKILL.md` | `artifacts/bugfix/docs/pr-description.md` exists |
| pr | `.claude/skills/pr/SKILL.md` | A PR URL has been shared in conversation |

### Rules

- Check artifacts in order. The first phase whose signal is NOT satisfied is next.
- If no artifacts exist and no assessment has been done, start at **assess**.
- If the user specifies a starting point in `$ARGUMENTS`, respect that.
- If conversation context clearly establishes a phase was completed (even
without an artifact), skip it.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

review phase completion is ambiguous without a durable signal.

The current rule depends on context interpretation, which can drift. Add a concrete review artifact so speedrun can deterministically run review exactly once per cycle.

Proposed update
-| review | `.claude/skills/review/SKILL.md` | Always run once between test and document |
+| review | `.claude/skills/review/SKILL.md` | `artifacts/bugfix/review/verdict.md` exists (for current fix cycle) |
-- If conversation context clearly establishes a phase was completed (even
--  without an artifact), skip it.
+- Use conversation context only as a fallback when artifact checks are impossible.
🧰 Tools
🪛 LanguageTool

[style] ~57-~57: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... point in $ARGUMENTS, respect that. - If conversation context clearly establishe...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/bugfix/.claude/commands/speedrun.md` around lines 48 - 58, Update
the speedrun phase gating to use a concrete, durable review artifact so the
review phase runs exactly once per cycle: modify
workflows/bugfix/.claude/commands/speedrun.md to require and check for a
persistent review artifact (e.g., an artifacts/bugfix/review-complete file)
instead of relying solely on context; update the table entry for the "review"
phase that currently references `.claude/skills/review/SKILL.md` to point to the
new artifact, and ensure any code that creates the artifact (the review workflow
or `.claude/skills/review` runner) writes that artifact when review completes so
`speedrun` can deterministically detect completion.

jwm4 added 2 commits March 12, 2026 19:04
The assess and review phases previously had no persistent artifacts,
relying on conversation state to determine completion. This breaks
resumability across session restarts.

- Assess skill now writes artifacts/bugfix/reports/assessment.md
- Review skill now writes artifacts/bugfix/review/verdict.md
- Speedrun command updated to check these artifacts instead of
  conversation state for phase completion detection

Made-with: Cursor
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
workflows/bugfix/.claude/skills/controller/SKILL.md (1)

41-49: ⚠️ Potential issue | 🟠 Major

Add escalation checks to the controller execution path for dispatcher parity.

The updated dispatch wording is good, but controller-driven runs still don’t apply the same escalation gate that speedrun applies (see workflows/bugfix/.claude/commands/speedrun.md, Line 76-Line 80). Please add the escalation check before proceeding to skill execution so behavior is consistent across entrypoints.

Proposed doc fix
 ## How to Execute a Phase
 
 1. **Announce** the phase to the user before doing anything else. Include this
    file as the dispatcher so skills know where to return, e.g.,
    "Starting the /fix phase (dispatched by `.claude/skills/controller/SKILL.md`)."
    This is very important so the user knows the workflow is working, learns
    about the commands, and so skills can find their way back here.
+2. **Apply escalation checks** before proceeding. If confidence is below 80%,
+   root cause is unclear, multiple valid solutions have unclear trade-offs,
+   a security/compliance concern appears, or an architectural decision is needed,
+   stop and ask the user.
-2. **Read** the skill file from the list above
-3. **Execute** the skill's steps directly — the user should see your progress
+3. **Read** the skill file from the list above
+4. **Execute** the skill's steps directly — the user should see your progress
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/bugfix/.claude/skills/controller/SKILL.md` around lines 41 - 49,
Add the same escalation gate used by the speedrun entrypoint to the
controller-driven dispatch flow in SKILL.md so controller runs check escalation
before executing skills; specifically, copy the escalation-check logic from the
speedrun command (the gate implemented around the dispatch step in
workflows/bugfix/.claude/commands/speedrun.md) and invoke it in the controller
dispatch sequence (the step that currently "Announce" -> "Read" -> "Execute")
immediately after the announcement and before reading/executing any skill,
aborting or escalating per the same conditions and messages as speedrun.
workflows/bugfix/.claude/commands/speedrun.md (1)

57-58: ⚠️ Potential issue | 🟠 Major

Avoid conversation-only completion fallback for phase skipping.

Line 57-Line 58 reintroduces non-durable routing and can skip the wrong phase after long sessions/resumes. Keep artifact checks authoritative, and only use conversation as last-resort when artifact lookup is impossible.

Proposed doc fix
-- If conversation context clearly establishes a phase was completed (even
-  without an artifact), skip it.
+- Use conversation context only when artifact checks are impossible
+  (for example, artifact read failure), and report that fallback explicitly.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/bugfix/.claude/commands/speedrun.md` around lines 57 - 58, Replace
the current sentence that permits skipping a phase based solely on conversation
context with a rule that artifact checks are authoritative: update the wording
around "If conversation context clearly establishes a phase was completed (even
without an artifact), skip it." so it instead states that phases must only be
skipped when a corresponding artifact is present, and conversation-only evidence
may be used only as a last-resort fallback when artifact lookup is impossible;
ensure the doc references "artifact checks" as primary and "conversation
fallback" as secondary to prevent non-durable routing and incorrect phase
skipping after long sessions/resumes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@workflows/bugfix/.claude/commands/speedrun.md`:
- Line 50: Update the `pr` phase completion check to rely on a durable artifact
instead of conversational state: change the completion condition for the "pr"
phase to verify the presence of an artifact (e.g., a PR URL file) and modify the
PR skill (`.claude/skills/pr/SKILL.md`) to write the created/shared PR URL into
that artifact (suggested name: artifacts/bugfix/pr/url.md) when it outputs the
URL; ensure the phase runner reads that artifact to mark completion so
retries/resumes detect the PR URL deterministically.

---

Duplicate comments:
In `@workflows/bugfix/.claude/commands/speedrun.md`:
- Around line 57-58: Replace the current sentence that permits skipping a phase
based solely on conversation context with a rule that artifact checks are
authoritative: update the wording around "If conversation context clearly
establishes a phase was completed (even without an artifact), skip it." so it
instead states that phases must only be skipped when a corresponding artifact is
present, and conversation-only evidence may be used only as a last-resort
fallback when artifact lookup is impossible; ensure the doc references "artifact
checks" as primary and "conversation fallback" as secondary to prevent
non-durable routing and incorrect phase skipping after long sessions/resumes.

In `@workflows/bugfix/.claude/skills/controller/SKILL.md`:
- Around line 41-49: Add the same escalation gate used by the speedrun
entrypoint to the controller-driven dispatch flow in SKILL.md so controller runs
check escalation before executing skills; specifically, copy the
escalation-check logic from the speedrun command (the gate implemented around
the dispatch step in workflows/bugfix/.claude/commands/speedrun.md) and invoke
it in the controller dispatch sequence (the step that currently "Announce" ->
"Read" -> "Execute") immediately after the announcement and before
reading/executing any skill, aborting or escalating per the same conditions and
messages as speedrun.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f05d29c8-3046-4645-a567-643e91267260

📥 Commits

Reviewing files that changed from the base of the PR and between 7d4b7e8 and 0655d24.

📒 Files selected for processing (10)
  • workflows/bugfix/.claude/commands/speedrun.md
  • workflows/bugfix/.claude/skills/assess/SKILL.md
  • workflows/bugfix/.claude/skills/controller/SKILL.md
  • workflows/bugfix/.claude/skills/diagnose/SKILL.md
  • workflows/bugfix/.claude/skills/document/SKILL.md
  • workflows/bugfix/.claude/skills/fix/SKILL.md
  • workflows/bugfix/.claude/skills/pr/SKILL.md
  • workflows/bugfix/.claude/skills/reproduce/SKILL.md
  • workflows/bugfix/.claude/skills/review/SKILL.md
  • workflows/bugfix/.claude/skills/test/SKILL.md

@jwm4 jwm4 merged commit 4269fc3 into ambient-code:main Mar 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add YOLO mode to bug fix workflow

2 participants